import request from '@/utils/request'

export function view(id) {
    return request({
      url: '/plm-sys/objectRelation/view?id=' + id,
      method: 'GET'
    })
}
export function queryList(data) {
  return request({
    url: '/plm-sys/objectRelation/queryList?',
    method: 'POST',
    data
  })
}

export function dels(data) {
  return request({
    url: '/plm-sys/objectRelation/dels',
    method: 'DELETE',
    data
  })
}

export function getUsedLocation(params) {
  return request({
    url: '/plm-sys/objectInstance/getUsedLocation',
    method: 'POST',
    params
  })
}

export function add(data) {
  return request({
    url: '/plm-sys/api/sysWorkspace/add',
    method: 'POST',
    data
  })
}


export function queryMaterial(params) {
  return request({
    url: '/plm-sys/objectInstance/getObjectInsList',
    method: 'GET',
    params
  })
}

export function addRelation(data) {
  return request({
    url: '/plm-sys/objectRelation/add',
    method: 'POST',
    data
  })
}

export function operationLog(data) {
  return request({
    url: '/plm-sys/api/operationLog/queryPageList',
    method: 'POST',
    data
  })
}

export function getFileUsedLocation(params) {
  return request({
    url: '/plm-sys/objectInstance/getFileUsedLocation',
    method: 'POST',
    params
  })
}
